package com.itfs.strategy;

public class Consumer {
    //声明一个优惠策略
    private DiscountStrategy discountStrategy;
    //构造方法引入
    public Consumer(DiscountStrategy discountStrategy){
        this.discountStrategy = discountStrategy;
    }
    //执行优惠策略
    public void execute(){
        this.discountStrategy.doDiscount();
    }
}